package net.chowda.appinject.action;

import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
import net.chowda.appinject.model.AppConfigManager;
import net.chowda.appinject.model.AppConfig;

import java.util.List;

public class AppInjectAction extends BounceAction {
    private AppConfig appConfig = null;
    private List<AppConfig> apps = null;

    public Resolution inject() {
        if (action != null) {
            appConfig = AppConfigManager.getAppConfig(action);
        }
        apps = AppConfigManager.getAppConfigs();
        return new ForwardResolution("app_inject.jsp");
    }

    public List<AppConfig> getApps() { return apps; }
    public void setApps(List<AppConfig> apps) { this.apps = apps; }
    public AppConfig getAppConfig() { return appConfig; }
    public void setAppConfig(AppConfig appConfig) { this.appConfig = appConfig; }
}
